package com.galaxy.payment.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付方式枚举
 */
@Getter
@AllArgsConstructor
public enum PaymentTypeEnum {
    
    WECHAT(1, "微信支付"),
    BALANCE(2, "余额支付"),
    POINTS(3, "积分支付"),
    ALIPAY(4, "支付宝支付");

    private final Integer code;
    private final String info;

    public static PaymentTypeEnum getByCode(Integer code) {
        for (PaymentTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
} 